1 00:00:01,470 --> 00:00:05,190 I need to go to my shop. 2 00:00:06,440 --> 00:00:10,040 And on this bell, I'm going to hit the alt and click. 3 00:00:10,460 --> 00:00:12,950 And then I have my shop bell. 4 00:00:12,950 --> 00:00:13,940 And there's the bell. 5 00:00:13,940 --> 00:00:15,530 Top of the point. 6 00:00:15,530 --> 00:00:17,270 The top and the bottom. 7 00:00:17,270 --> 00:00:18,770 They're just parts, right? 8 00:00:18,770 --> 00:00:21,740 There's nothing there's nothing particularly cool about them. 9 00:00:22,220 --> 00:00:27,050 I'm going to put a click detector on here that's going to activate my store. 10 00:00:27,080 --> 00:00:34,070 Let's hit the plus sign click detector, and I'll just call this click. 11 00:00:37,120 --> 00:00:37,840 Here we go. 12 00:00:37,840 --> 00:00:41,010 And I also want to put a script on here. 13 00:00:41,020 --> 00:00:42,630 Hit the plus sign. 14 00:00:42,640 --> 00:00:54,280 I had a script and this script I'm going to call Activate Shop script, activate Shop script, and we'll 15 00:00:54,280 --> 00:00:55,110 get it going. 16 00:00:55,120 --> 00:00:57,220 We'll just just do something simple here. 17 00:00:57,220 --> 00:00:59,920 I'm going to close this so we have more space. 18 00:01:00,160 --> 00:01:03,390 There's a print button in air or a print statement in there. 19 00:01:03,400 --> 00:01:07,720 Let's get a variable pointing to our click. 20 00:01:07,720 --> 00:01:11,770 So we have a script dot parent and then we go down one level to get click. 21 00:01:11,770 --> 00:01:12,370 Right. 22 00:01:12,820 --> 00:01:13,690 There it is. 23 00:01:13,690 --> 00:01:14,620 Click right. 24 00:01:14,620 --> 00:01:16,630 So that's the script. 25 00:01:16,630 --> 00:01:17,410 Bell tops. 26 00:01:17,410 --> 00:01:19,120 Parent There's a click. 27 00:01:19,120 --> 00:01:23,650 Now the clicks are pretty good because you can get the player from the click. 28 00:01:23,650 --> 00:01:32,020 Whoever clicked the foul, which is or the button with a click detector, mouse click colon connect 29 00:01:32,470 --> 00:01:35,530 function player. 30 00:01:36,370 --> 00:01:37,810 Now let's just print it out. 31 00:01:37,810 --> 00:01:43,150 Just make sure that we can print stuff that we when we click the bell, things are working so far. 32 00:01:43,150 --> 00:01:46,910 Hey and then I'll do player dot name, right? 33 00:01:47,050 --> 00:01:50,410 Because we're going to get the player from the mouse click. 34 00:01:50,410 --> 00:01:54,700 When we click the click detector, let's go ahead and go view output. 35 00:01:55,540 --> 00:01:56,980 Hit the play button. 36 00:01:59,940 --> 00:02:02,920 Playing same day, Game six. 37 00:02:02,990 --> 00:02:03,210 All right. 38 00:02:03,210 --> 00:02:04,380 I'm going to go over here. 39 00:02:06,530 --> 00:02:07,070 Boom. 40 00:02:07,070 --> 00:02:07,890 There it is. 41 00:02:07,910 --> 00:02:08,510 I see him. 42 00:02:08,540 --> 00:02:09,760 Hey, Semtech Nitro. 43 00:02:09,770 --> 00:02:10,850 One, right? 44 00:02:10,850 --> 00:02:12,170 We have too much stuff. 45 00:02:12,260 --> 00:02:15,920 I think what I'm going to do is I'm going to get rid of some of these print statements. 46 00:02:18,840 --> 00:02:22,860 All right, let's turn this game off and we'll get some of these print statements. 47 00:02:22,950 --> 00:02:26,990 We got play playing the same day. 48 00:02:27,000 --> 00:02:31,710 Let's go to the game manager, game managers and server script service right here. 49 00:02:31,740 --> 00:02:35,160 Game manager and scroll down. 50 00:02:36,420 --> 00:02:43,950 Here it is playing in the same day that is in I'm going to close this that is in check daily streak. 51 00:02:43,950 --> 00:02:45,890 So this fires a lot. 52 00:02:45,900 --> 00:02:51,180 I'm only going to comment it out because we may need to see streak info if we run into any problems. 53 00:02:51,180 --> 00:02:52,770 I don't suspect we will. 54 00:02:53,130 --> 00:02:57,090 And another one under the save loop. 55 00:02:57,090 --> 00:02:57,480 Right. 56 00:02:57,480 --> 00:03:00,000 So we're saving player data. 57 00:03:00,000 --> 00:03:05,100 If the data is not bad, let's not print that out. 58 00:03:06,240 --> 00:03:07,020 There we go. 59 00:03:07,020 --> 00:03:08,790 If it is bad, we will print that out. 60 00:03:08,790 --> 00:03:09,570 We might need that. 61 00:03:09,570 --> 00:03:10,800 We might need that info. 62 00:03:10,800 --> 00:03:17,130 And then under the save loop, I'm going to get rid of that save. 63 00:03:17,130 --> 00:03:17,700 I'm sorry. 64 00:03:17,700 --> 00:03:19,650 I'm going to get rid of that print one right here. 65 00:03:22,170 --> 00:03:22,560 All right. 66 00:03:22,560 --> 00:03:25,440 And message queue. 67 00:03:25,440 --> 00:03:31,230 So if you go down to your starter guy, we had that message thing we did not too not too long ago. 68 00:03:31,500 --> 00:03:32,910 Print message, script. 69 00:03:32,910 --> 00:03:36,270 We don't need to know if the queue is empty. 70 00:03:36,780 --> 00:03:38,430 I will comment that out. 71 00:03:38,550 --> 00:03:44,370 Now let's go ahead and play this, see if we have a a little bit better of a time seeing our print statement. 72 00:03:44,370 --> 00:03:49,320 I'm going to go to the output window view output and that's a little bit better. 73 00:03:49,500 --> 00:03:51,300 I'm going to go over to my bell. 74 00:03:52,340 --> 00:03:54,220 Dang, we don't have the dang yet. 75 00:03:54,230 --> 00:03:55,220 We're going to add that. 76 00:03:55,220 --> 00:03:57,080 Hey Semtech Nitro one. 77 00:03:57,080 --> 00:04:01,630 So our click detector knew that we clicked the bell. 78 00:04:01,640 --> 00:04:02,650 That's great. 79 00:04:02,660 --> 00:04:04,220 We have a player. 80 00:04:06,400 --> 00:04:07,990 It's good and turn off our game. 81 00:04:07,990 --> 00:04:13,600 And now I want to go to I want to close some of this stuff that I was playing around with. 82 00:04:13,630 --> 00:04:16,270 I want to go to my activate shop script. 83 00:04:16,270 --> 00:04:16,810 Remember? 84 00:04:16,810 --> 00:04:18,550 That is in your shop. 85 00:04:19,140 --> 00:04:20,130 There's our shop. 86 00:04:20,130 --> 00:04:23,110 We'll open it up and activate shop script. 87 00:04:23,130 --> 00:04:30,240 If you can't find a script and it's open, like let's say you're here, if you right click on Activate 88 00:04:30,240 --> 00:04:33,660 shop, you can show in Explorer. 89 00:04:34,050 --> 00:04:35,460 And that's pretty handy. 90 00:04:35,460 --> 00:04:36,540 There it is. 91 00:04:36,570 --> 00:04:39,780 That's pretty handy if you lose a script, especially if you're kind of careless. 92 00:04:40,050 --> 00:04:45,960 You're developing things real quick and you have like 50 things named script, which is not good, but 93 00:04:45,960 --> 00:04:48,540 then you can find out which script you have, right? 94 00:04:48,540 --> 00:04:51,660 You just do that right click and then show and explore. 95 00:04:51,900 --> 00:04:52,290 All right. 96 00:04:52,290 --> 00:04:59,580 So I want to send a message to my client because we're going to bring up a window when we hit our little 97 00:05:00,090 --> 00:05:03,530 when we hit our little bell, we're also going to do a dang, right. 98 00:05:03,540 --> 00:05:11,340 So I need to get replicated storage gain, get service, replicated storage. 99 00:05:11,340 --> 00:05:13,830 I also want a remote event. 100 00:05:13,830 --> 00:05:17,520 I'm going to do a remote event for my shop. 101 00:05:17,580 --> 00:05:18,900 I'm going to get rid of this. 102 00:05:19,880 --> 00:05:22,550 So let's go down replicated storage. 103 00:05:23,720 --> 00:05:28,970 And I'm going to do the remote event to open and close the windows and to do purchases, but I'm going 104 00:05:28,970 --> 00:05:30,530 to call it shop Ray. 105 00:05:30,560 --> 00:05:39,200 So in replicated storage, hit the plus, add a remote event and let's call this shop Ari. 106 00:05:41,180 --> 00:05:41,870 There we go. 107 00:05:42,080 --> 00:05:46,940 And then I can get that here in my activate shop script. 108 00:05:46,970 --> 00:05:48,490 I'll say shop. 109 00:05:48,500 --> 00:05:51,520 Ari, It is in replicated storage. 110 00:05:51,530 --> 00:05:54,590 Wait for child shop, Ari. 111 00:05:54,770 --> 00:06:00,890 Now, here, we could get rid of this so we don't have 1000 print statements again. 112 00:06:00,890 --> 00:06:04,340 And let's do a shop. 113 00:06:04,340 --> 00:06:11,450 Are a colon fire client, All right. 114 00:06:11,450 --> 00:06:12,320 And. 115 00:06:13,680 --> 00:06:18,120 I'm just going to pass in the client that I want to fire to. 116 00:06:18,120 --> 00:06:20,400 And that's the player who clicked the bell.